<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<!--
弹框显示div区域内元素文本内容的和，也就是要计算1+2+3的和
-->

<select id="sel" onchange="change()">

    <option value="0">运输方式</option>
    <option value="物流">物流</option>
    <option value="快递">快递</option>

</select>

<select id="son">
    <option value="0">公司</option>

</select>


</body>

<script>
    var arr=[
        ["德邦","华宇","申通","中邮"],
        ["圆通","韵达","天天","汇通"]
    ];
    function change(){
        var sle =document.getElementById('sel');
        var son =document.getElementById('son');
        var value=arr[sle.selectedIndex-1];


        son.length=1;
        for(var i=0;i<value.length;i++){
            son[i+1]=new Option(value[i],value[i]);
        }

    }

</script>
</html>